* net/eww.el (eww): Add a trailing slash to domain names.
authorIvan Kanis <ivan@kanis.fr>
Mon, 24 Jun 2013 17:38:51 +0000 (19:38 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 24 Jun 2013 17:38:51 +0000 (19:38 +0200)
lisp/ChangeLog
lisp/net/eww.el

index 2d3d28cedc87273b3aa120eaa464d8bd8f91ee49..10ca2b1cd0123264df2b53fdd3b9905d8b7bb5b3 100644 (file)
@@ -1,3 +1,7 @@
+2013-06-24  Ivan Kanis  <ivan@kanis.fr>
+
+       * net/eww.el (eww): Add a trailing slash to domain names.
+
 2013-06-24  Juanma Barranquero  <lekktu@gmail.com>
 
        * faces.el (face-spec-recalc): Revert part of revno:113147 (bug#14705).
index 535992513a26ded3f5d7f0eb72e1f78eba512350..7b37eda185e79baf4b24b2a90341663f64a400bc 100644 (file)
@@ -102,8 +102,12 @@ word(s) will be searched for via `eww-search-prefix'."
   (interactive "sEnter URL or keywords: ")
   (if (and (= (length (split-string url)) 1)
            (> (length (split-string url "\\.")) 1))
-      (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
-        (setq url (concat "http://" url)))
+      (progn
+        (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
+          (setq url (concat "http://" url)))
+        ;; some site don't redirect final /
+        (when (string= (url-filename (url-generic-parse-url url)) "")
+          (setq url (concat url "/"))))
     (unless (string-match-p "^file:" url)
       (setq url (concat eww-search-prefix
                         (replace-regexp-in-string " " "+" url)))))